package tienmanh.gs.goldminer.sound;


import tienmanh.gs.goldminer.manager.ResourcesManager;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class SoundGame {

	public static String filename = "sound";
	public static SharedPreferences sp;
	public static Editor edit;
	
	public static void init(){
		sp = ResourcesManager.getInstance().activity.getSharedPreferences(filename,0);
		edit = sp.edit();
	}
	public static void writeSoundSP(float value){
	    edit.putFloat("sound", value);
	    edit.commit();
	}
	public static void writeEffectSP(float value){
		edit.putFloat("effect", value);
	    edit.commit();
	}
	public static float readSoundSP(){
		return sp.getFloat("sound", 0.5f);
	}
	public static float readEffectSP(){
		return sp.getFloat("effect", 0.5f);
	}
}
